Skip to content

atomic-ehr-codegen-python-us-core-profiles: doc fix + regenerate fhir_types (codegen canary)#37

Open
ryukzak wants to merge 2 commits into
mainfrom
fix/codegen-python-client-fhirpy-docs
Open

atomic-ehr-codegen-python-us-core-profiles: doc fix + regenerate fhir_types (codegen canary)#37
ryukzak wants to merge 2 commits into
mainfrom
fix/codegen-python-client-fhirpy-docs

Conversation

@ryukzak

@ryukzak ryukzak commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Two changes to developer-experience/atomic-ehr-codegen-python-us-core-profiles:

1. Docs: correct the codegen option name

The README and post.py docstring referenced fhirpyClient: true, but the current @atomic-ehr/codegen API — and this example's own generate.ts — use client: "fhirpy". Fixed the three stale references.

2. Regenerate fhir_types/ with the codegen canary

Regenerated with @atomic-ehr/codegen@0.0.16-canary.20260626094300.e87ff88 (package.json updated accordingly). Diff is small (8 files):

  • Concrete resources type resourceType as str (the pattern still fixes the value) instead of Literal[...].
  • Abstract base types (Resource, DomainResource) no longer carry a resourceType default.
  • FhirpyBaseModel guards against PydanticUndefined, so it no longer registers a class-level resourceType for those abstract types (which concrete subclasses would shadow).

Verification (after regeneration)

  • mypy . → no issues (35 source files, strict mode)
  • python load.py → writes bundle.json (10 entries)
  • python avg.pyAvg BP: 125.2/82.0 mmHg (n=5)
  • python post.py → transaction committed against a local Aidbox, observations read back as typed Observation resources

Note: package.json now pins an ephemeral canary build. If you'd prefer to wait for a stable release before merging the regeneration, the doc fix (commit 1) stands on its own.

ryukzak added 2 commits June 26, 2026 14:53
…ion name to client: "fhirpy"

The README and post.py docstring referenced `fhirpyClient: true`, but the
current @atomic-ehr/codegen API (and this example`s generate.ts) use
`client: "fhirpy"`. Update the three references to match.
…pes with @atomic-ehr/codegen canary

Regenerated with @atomic-ehr/codegen@0.0.16-canary.20260626094300.e87ff88.
Canary changes: concrete resources type resourceType as `str` (pattern still
fixes the value) instead of `Literal[...]`, abstract base types (Resource,
DomainResource) no longer carry a resourceType default, and FhirpyBaseModel
guards against PydanticUndefined so it does not register a class-level
resourceType for those abstract types.

Verified: mypy clean (35 files), load.py / avg.py run, and post.py round-trips
a transaction against a local Aidbox with typed read-back.
@ryukzak ryukzak changed the title docs: correct @atomic-ehr/codegen option name to client: "fhirpy" atomic-ehr-codegen-python-us-core-profiles: doc fix + regenerate fhir_types (codegen canary) Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant